Skip to content

Conversation

nikgraf
Copy link
Collaborator

@nikgraf nikgraf commented Jun 30, 2025

No description provided.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR implements entity updates by publishing only the changed values.

  • Added a new "value" field to both the GraphQL query and type definitions.
  • Implemented update logic that serializes and compares current entity values before pushing updates.
  • Removed an unnecessary ts-expect-error comment in the private spaces hook.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
packages/hypergraph-react/src/prepare-publish.ts Added "value" field and update logic for entity values.
apps/connect/src/hooks/use-private-spaces.ts Removed ts-expect-error comment on appInfo usage.

const existingValue = data.entity.values.find((value) => value.propertyId === propertyId);

if (serializedValue !== existingValue?.value) {
values.push({ property: propertyId, value: serializedValue });
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The key 'property' used in the update object is inconsistent with the established schema which uses 'propertyId'. Update this to 'propertyId' to ensure consistency with the GraphQL query and type definitions.

Suggested change
values.push({ property: propertyId, value: serializedValue });
values.push({ propertyId: propertyId, value: serializedValue });

Copilot uses AI. Check for mistakes.

@nikgraf nikgraf merged commit 36653b3 into main Jun 30, 2025
6 checks passed
@nikgraf nikgraf deleted the ng/publish-entity-updates branch June 30, 2025 15:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant